<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<?php 
include_once "config/config.php"; 
include_once "functions/genericfunctions.php";
include_once "functions/drawTables.php";
include_once "functions/drawCode.php"; 

?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>SQL mokomasis puslapis</title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <link type="text/css" rel="stylesheet" media="all" href="css/styles.css" />
    <script src="scripts/modernizr-2.0.4.js"></script>
</head>
<body>
    <div id="page-wrapper">
        <div id="page">
            <?php 
            	$_SESSION['psl']=3;
            	include('header1.php'); 
            ?>
            <div class="content">
                <div class="left-side">
                    <?php include('menu-left.html'); ?>
                </div>
                <div class="right-side"> 
            		 <?php
            		 	$string = '<p>'.$_SESSION['seldata']['salyga'].'</p><br />';
		            	$_SESSION['seldata'] = GetUzduotis($selectdata_name, $workDB);
			            
            		 	$patterns = array('/\@Lentele_Select1/', 
            		 					  '/\@Lentele_Select2/',
										  '/\@Kodas_Select1/',
										  '/\@Kodas_Select2/',
										  '/\@Kodas_Select3/',
										  '/\@Select_Pratybos_Lentele1/',
										  '/\@Select_Pratybos_Uzduotis1/');
						$replacements = array(printTblSelect1($workDB, true), 
            		 					      printTblSelect2($workDB, true),
										      printCodeSelect1(),
										      printCodeSelect2(),
										      printCodeSelect3(),
										      printTblSelect3($workDB),
										      $string);

            		 	print preg_replace($patterns, $replacements, getTexts(3, $workDB));
					  ?>
			    
			    <div>
			        

			        <form class="forma" action="insertQuerySELECT.php" method="post">
			            <table>
			                <tr><td><textarea cols="50" rows="10" name="sql_code"></textarea></td></tr>
			                <tr><td style="text-align:right;"><input type="submit" value="Atrinkti" /></td></tr>
			            </table>
			        </form>			 
				</div>

            



                 </div>
              
            </div>
            <?php include('footer.html'); ?>
        </div>
    </div>
    <input type="hidden" id="hid" />

    <script src="http://code.jquery.com/jquery-latest.js"></script>

    <script type="text/javascript" src="scripts/navigacija.js"></script> 	

</body>
</html>